package main

import (
	"io/ioutil"
	"strconv"
	"strings"
)

func resolvePrice() map[string]int {
	file, err := ioutil.ReadFile("price.txt")
	if err != nil {
		panic(err)
	}
	m := make(map[string]int)
	s := strings.Split(string(file), "\n")
	for i := range s {
		s2 := strings.Trim(s[i], "\r")
		s3 := s2[:strings.Index(s2, "|")]
		c, err := strconv.Atoi(s2[strings.Index(s2, "|")+1:])
		if err != nil {
			panic(err)
		}
		m[s3] = c
	}
	return m
}
